from django import forms
# from mdeditor.fields import MDTextFormField
from django_quill.forms import QuillFormField

class RangeNumberInput(forms.FloatField):
    widget = forms.NumberInput(attrs={'class':'custom-range col-md-6', 'type':'range', 'min':0, 'max':10, 'step':0.5})

class EditorForm(forms.Form):
    qq = forms.CharField(max_length=20, widget=forms.TextInput(attrs={'class':'form-control'}), label="QQ号")
    phone = forms.CharField(max_length=20, widget=forms.TextInput(attrs={'class':'form-control'}), label="电话号码")
    intro = QuillFormField(label='介绍一下你自己吧')

class CommentForm(forms.Form):
    iq = RangeNumberInput(max_value=10, label='Ta的智商（满分10分）')
    eq = RangeNumberInput(max_value=10, label='Ta的情商（满分10分）')
    relation = RangeNumberInput(max_value=10, label='Ta的人际交往（满分10分）')
    comment = forms.CharField(widget=forms.Textarea(attrs={'class':'form-control'}), label='具体说说')
    is_private = forms.BooleanField(label="这是不是只想对Ta一个人说的秘密？", required=False)